package com.peng.user.utils;

import lombok.Setter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@Setter
@ConfigurationProperties(prefix = "wx.open")
public class ConstantProperties implements InitializingBean {
    private String app_id;
    private String app_secret;
    private String redirect_url;

    public static String WX_APP_ID;
    public static String WX_APP_SECRET;
    public static String WX_REDIRECT_URL;
    @Override
    public void afterPropertiesSet() throws Exception {
        WX_APP_ID=this.app_id;
        WX_APP_SECRET=this.app_secret;
        WX_REDIRECT_URL=this.redirect_url;
    }
}
